<template>
	<view class="container">
		<custom-nav-bar title="划转" @rightBtn="showFilter = true" isRight="false"/>
		
		<!-- 我的地址 (不可编辑) -->
		<view class="form-item">
			<text class="label">下级账号</text>
			<view class="input-group">
				<input class="input" :value="myAddress" disabled placeholder="我的钱包地址" />
			</view>
		</view>
	
		<!-- 转账地址 -->
		<!-- <view class="form-item">
			<text class="label">转账地址</text>
			<input class="input" v-model="formData.toAddress" disabled placeholder="我的转账地址"/>
			<text class="error" v-if="errors.toAddress">{{ errors.toAddress }}</text>
		</view> -->
	
		<!-- 转账金额 -->
		<view class="form-item">
			<text class="label">转账金额</text>
			<input class="input" v-model="formData.amount" placeholder="单笔转账限额0~1000000" 
				@input="validateAmount" type="number" />
			<text class="error" v-if="errors.amount">{{ errors.amount }}</text>
		</view>
		
		<!-- 交易密码 -->
		<view class="form-item">
			<text class="label">交易密码</text>
			<input class="input" v-model="formData.password" placeholder="请输入交易密码" 
				@blur="validatePassword" type="password" maxlength="6" />
			<text class="error" v-if="errors.password">{{ errors.password }}</text>
		</view>
		
		<button class="submit-btn" @click="submitForm">确认转账</button>
	</view>
</template>

<script src="./index.js"></script>
<style scoped src="./index.scss" lang="scss"></style>